/*
 * p1342.cpp
 *
 *  Created on: 2013-6-3
 *      Author: zy
 */

#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
const double eps = 1e-10;
int sig(double d)
{
	return fabs(d) < eps ? 0 : d < 0 ? -1 : 1;
}
struct Point
{
	double x, y;
	void read()
	{
		scanf("%lf%lf", &x, &y);
	}
	bool friend operator <(Point a, Point b)
	{
		if (sig(a.x - b.x) == 0)
			return a.y < b.y;
		return a.x < b.x;
	}
	bool friend operator ==(Point a, Point b)
	{
		return sig(a.x - b.x) == 0 && sig(a.y - b.y) == 0;

	}

};
double cross(Point o, Point a, Point b)
{
	return (a.x - o.x) * (b.y - o.y) - (b.x - o.x) * (a.y - o.y);
}

double dot(Point o, Point a, Point b)
{
	return (a.x - o.x) * (b.x - o.x) + (a.y - o.y) * (b.y - o.y);
	//return ans;
}
int btw(Point o, Point a, Point b)
{
	return sig(dot(o, a, b));
}
int segCross(Point a, Point b, Point c, Point d, Point &p)
{
	double s1 = cross(a, b, c);
	double s2 = cross(a, b, d);
	int d1 = sig(s1);
	int d2 = sig(s2);
	int d3 = sig(cross(c, d, a));
	int d4 = sig(cross(c, d, b));
	if ((d1 ^ d2) == -2 && (d3 ^ d4) == -2)
	{
		p.x = (c.x * s2 - d.x * s1) / (s2 - s1);
		p.y = (c.y * s2 - d.y * s1) / (s2 - s1);
		return 1;
	}
	return 0;
}
bool onSeg(Point p, Point a, Point b)
{
	return sig(cross(p, a, b)) == 0 && sig(dot(p, a, b)) < 0;
}
Point p[310], v[90001];
int main()
{
	int n, cas = 0;
	while (scanf("%d", &n)==1 && n)
	{
		for (int i = 0; i < n; i++)
		{
			p[i].read();
			v[i] = p[i];
		}
		n--;
		int c = n, e = n;
		for (int i = 0; i < n-1; i++)
			for (int j = i + 1; j < n; j++)
			{
				Point tem;
				if (segCross(p[i], p[i + 1], p[j], p[j + 1], tem))
				{
					v[c++] = tem;
				}
			}
		sort(v, v + c);
		c = unique(v, v + c) - v;
		for (int i = 0; i < c; i++)
			for (int j = 0; j < n; j++)
				if (onSeg(v[i], p[j], p[j + 1]))
					e++;
		printf("Case %d: There are %d pieces.\n", ++cas, e - c + 2);
	}
	return 0;
}
